﻿using System;
using System.Collections;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using System.IO;
using System.Xml.Serialization;

/// <summary>

/// </summary>
[WebService(Namespace="http://www.yanglihao.com/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// [System.Web.Script.Services.ScriptService]
public class PageWebService : System.Web.Services.WebService {

    
    public PageWebService () {

        
    }

    [WebMethod]
    public page getPage(string username,string directory)
    {
        Xmlserdeser xser = new Xmlserdeser(Server.MapPath(".")+"\\", username,directory);
        page myPage = xser.Mpage;

        for (int i = 0; i < myPage.Mtables.Count; i++)
        {
            for (int k = 0; k < myPage.Mtables[i].Mrows.Count; k++)
            {
                myPage.Mtables[i].Mrows[k] = null;
            }
        }

        myPage.Muser.Root = null;
        return myPage;
    }

    [WebMethod]
    public int MethodOne()
    {
        return 0;
    }
    
}

